//
//  TYTimer.h
//  TYBase_Example
//
//  Created by 谢航宇 on 2023/7/7.
//  Copyright © 2023 谢航宇. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface TYTimer : NSObject
@property (nonatomic,assign) NSTimeInterval second;
@property (nonatomic,assign) NSTimeInterval step;
@property (nonatomic,retain,nullable) NSTimer * timer;
@property (nonatomic,weak) id obj;
@property (nonatomic,copy) void(^timeAction)(NSTimeInterval second);

+ (instancetype)timerInTarget:(id)obj step:(NSTimeInterval)step complete:(void(^)(NSTimeInterval second))timeAction;

- (void)start;
- (void)stop;
@end

NS_ASSUME_NONNULL_END
